import request from '@/utils/request'

// 查询【预警信息】列表
export function listWarning(query) {
  return request({
    url: '/platform/warning/list',
    method: 'get',
    params: query
  })
}

// 查询【预警信息】详细
export function getWarning(warningId) {
  return request({
    url: '/platform/warning/' + warningId,
    method: 'get'
  })
}

// 修改【预警信息】
export function updateWarning(data) {
  return request({
    url: '/platform/warning',
    method: 'put',
    data: data
  })
}

// 删除【预警信息】
export function delWarning(warningId) {
  return request({
    url: '/platform/warning/' + warningId,
    method: 'delete'
  })
}

// 查询预警报表台账列表
export function listWarningReports(query) {
  return request({
    url: '/platform/warn-report/list',
    method: 'get',
    params: query
  })
}
// 查询【预警信息】详细
export function getWarningReport(warningId) {
  return request({
    url: '/platform/warn-report/' + warningId,
    method: 'get'
  })
}
